<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateBlackWordsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('black_words', function (Blueprint $table) {
            $table->increments('id');
            $table->string('word', 50)->default('')->comment('敏感词');
            $table->tinyInteger('word_type')->default(1)->comment('敏感词分类');
            $table->tinyInteger('flag')->default(1)->comment('记录状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('black_words');
    }
}
